package demo;

import com.alibaba.excel.EasyExcel;

import java.util.List;

public class Demo01 {
    public static void main(String[] args) {
        String file = "excel/demo.xlsx";
        DemoListener listener = new DemoListener();
        //读取Excel文件
        EasyExcel.read(file, Product.class, listener).sheet().doRead();
        //检查读取结果
        List<Product> list = listener.getProducts();
        for(Product product: list){
            System.out.println(product);
        }
    }
}
